.class public Les/q7;
.super Les/r7;
.source "MediaSurfaceEncoder.java"


# instance fields
.field private H:I

.field private I:I

.field protected J:Landroid/view/Surface;


# direct methods
.method public constructor <init>(IIIIII)V
    .locals 0

    .line 1
    invoke-direct {p0, p1, p2, p3, p4}, Les/r7;-><init>(IIII)V

    const/4 p1, -0x1

    .line 2
    iput p1, p0, Les/q7;->H:I

    .line 3
    iput p1, p0, Les/q7;->I:I

    .line 4
    iput p5, p0, Les/q7;->H:I

    .line 5
    iput p6, p0, Les/q7;->I:I

    return-void
.end method


# virtual methods
.method protected B()Z
    .locals 5

    const-string v0, "prepare error"

    const-string v1, "prepare: "

    .line 1
    invoke-virtual {p0, v1}, Les/o7;->a(Ljava/lang/String;)V

    const/4 v1, 0x0

    :try_start_0
    const-string v2, "video/avc"

    .line 2
    iget v3, p0, Les/q7;->H:I

    iget v4, p0, Les/q7;->I:I

    invoke-virtual {p0, v2, v3, v4}, Les/r7;->a(Ljava/lang/String;II)Landroid/view/Surface;

    move-result-object v2

    iput-object v2, p0, Les/q7;->J:Landroid/view/Surface;

    if-nez v2, :cond_0

    .line 3
    invoke-virtual {p0, v0}, Les/o7;->a(Ljava/lang/String;)V

    return v1

    .line 4
    :cond_0
    iget-object v2, p0, Les/o7;->k:Lcom/esfile/screen/recorder/media/util/n;

    invoke-virtual {v2}, Lcom/esfile/screen/recorder/media/util/n;->j()V

    const-string v2, "prepare finishing"

    .line 5
    invoke-virtual {p0, v2}, Les/o7;->a(Ljava/lang/String;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    const/4 v0, 0x1

    return v0

    :catch_0
    move-exception v2

    .line 6
    invoke-virtual {v2}, Ljava/lang/Exception;->printStackTrace()V

    .line 7
    invoke-virtual {p0, v0}, Les/o7;->a(Ljava/lang/String;)V

    return v1
.end method

.method public C()Z
    .locals 2

    .line 1
    iget-boolean v0, p0, Les/o7;->i:Z

    const/4 v1, 0x1

    if-nez v0, :cond_1

    const-string v0, "sending EOS to encoder"

    .line 2
    invoke-virtual {p0, v0}, Les/o7;->a(Ljava/lang/String;)V

    .line 3
    iget-object v0, p0, Les/o7;->k:Lcom/esfile/screen/recorder/media/util/n;

    if-eqz v0, :cond_0

    .line 4
    :try_start_0
    invoke-virtual {v0}, Lcom/esfile/screen/recorder/media/util/n;->i()V
    :try_end_0
    .catch Ljava/lang/IllegalStateException; {:try_start_0 .. :try_end_0} :catch_0

    .line 5
    :catch_0
    :cond_0
    iput-boolean v1, p0, Les/o7;->i:Z

    .line 6
    invoke-virtual {p0}, Les/q7;->u()V

    :cond_1
    return v1
.end method

.method public D()Landroid/view/Surface;
    .locals 1

    .line 1
    iget-object v0, p0, Les/q7;->J:Landroid/view/Surface;

    return-object v0
.end method

.method public E()Lcom/esfile/screen/recorder/media/util/y;
    .locals 3

    .line 1
    new-instance v0, Lcom/esfile/screen/recorder/media/util/y;

    iget v1, p0, Les/r7;->D:I

    iget v2, p0, Les/r7;->E:I

    invoke-direct {v0, v1, v2}, Lcom/esfile/screen/recorder/media/util/y;-><init>(II)V

    return-object v0
.end method

.method protected l()V
    .locals 1

    .line 1
    iget-object v0, p0, Les/q7;->J:Landroid/view/Surface;

    if-eqz v0, :cond_0

    .line 2
    invoke-virtual {v0}, Landroid/view/Surface;->release()V

    const/4 v0, 0x0

    .line 3
    iput-object v0, p0, Les/q7;->J:Landroid/view/Surface;

    .line 4
    :cond_0
    invoke-super {p0}, Les/o7;->l()V

    return-void
.end method

.method public u()V
    .locals 0

    .line 1
    invoke-super {p0}, Les/o7;->u()V

    return-void
.end method

.method protected x()V
    .locals 0

    return-void
.end method
